package 平凡数;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long x = in.nextLong();
        long y = (long) Math.sqrt(x);
        if (x - y * y > (y + 1) * (y + 1) - x) {
            System.out.println((y + 1) * (y + 1));
        } else {
            System.out.println(y * y);
        }
    }
}
